/**
 * 解析url参数
 * Created by yi on 2016-12-28.
 * @return Object {id:12334}
 */
export function urlParse(variable) {
  let url = window.location.search.substr(1);
  var vars = url.split("&");
  for (var i = 0; i < vars.length; i++) {
    var pair = vars[i].split("=");
    console.log(vars)
    if (pair[0] == variable) {
      return +pair[1];
    }else{

    }
    return 4;
  }
};
